﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using DiscoveryLogic.Analytics.DataObjects;

namespace DiscoveryLogic.Analytics.Diagrams.Physics.Renderers
{
	/// <summary>
	/// straight line
	/// </summary>
	public class RubberBand:ISpringRenderer
	{
		#region props
		private Pen _Pen;
		/// <summary></summary>
		public Pen Pen
		{
			get
			{
				return this._Pen;
			}
			set
			{
				this._Pen = value;
			}
		}
		#endregion

		#region ctor
		public RubberBand(Pen pen)
		{
			this._Pen = pen;
		}
		#endregion

		#region Implementation of ISpringRenderer

		/// <summary>
		/// 
		/// </summary>
		/// <param name="spring"></param>
		/// <param name="dc"></param>
		public void Render(Spring spring, DrawingContext dc)
		{
			dc.DrawLine(this._Pen, spring.From.Position.ToPoint(),spring.To.Position.ToPoint());
		}

		#endregion
	}
}
